package com.bot.matchingSystem.Service.Impl;

import com.bot.matchingSystem.Service.Impl.utils.MatchingPool;
import com.bot.matchingSystem.Service.MatchingService;
import org.springframework.stereotype.Service;

@Service
public class MatchingServiceImpl implements MatchingService {
    public final  static MatchingPool matchingPool = new MatchingPool();
    @Override
    public String addPlayer(Integer userId, Integer rating, Integer snakeId) {
        System.err.println("addPlayer：" + userId + " " + rating);
        matchingPool.addPlayer(userId, rating, snakeId);
        return "add player success";
    }

    @Override
    public String removePlayer(Integer userId) {
        System.err.println("removePlayer: " + userId);
        matchingPool.removerPlayer(userId);
        return "remove player success";
    }
}
